{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'{\"data\":{\"siteId\":24042217,\"adzoneId\":83214582},\"info\":{\"message\":null,\"ok\":true},\"ok\":true,\"invalidKey\":null}'"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import requests\n",
    "\n",
    "data = {\n",
    "    'tag':'29',\n",
    "    'gcid':'8',\n",
    "    'siteid':'24042217',\n",
    "    'selectact':'add',\n",
    "    'newadzonename':'测试abc',\n",
    "    't':'1493957293934',\n",
    "    '_tb_token_':'2SlO14KtkSbq',\n",
    "    'pvid':'10_110.86.71.119_1457_1493957260668',\n",
    "}\n",
    "url = 'http://pub.alimama.com/common/adzone/selfAdzoneCreate.json'\n",
    "cookie_str = 'cookie2@@@cfe102aa3207802ac5a188719d1630f5;_tb_token_@@@2SlO14KtkSbq;t@@@ade2d638ebda7dc44fe74de6d6a1a5ff;v@@@0;cookie32@@@952c9fd643ed13cea5c39990efc48139;cookie31@@@Njg4NjkyNDAsbWVpbHl4aWFvLDI5MzM0Mjc2QHFxLmNvbSxUQg%3D%3D;alimamapwag@@@TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV09XNjQ7IHJ2OjUzLjApIEdlY2tvLzIwMTAwMTAxIEZpcmVmb3gvNTMuMA%3D%3D;login@@@VT5L2FSpMGV7TQ%3D%3D;alimamapw@@@DFwKDxwcUQQOOAVTU1FTBwQHUVtWVFxWWwNRUgZRBFYHVwQBBw1SBwAG;cna@@@mg6TEXeitW8CAW5WR3fBr54h;apushdbc5b1e1a2706414bbd2605f4029a333@@@%7B%22ts%22%3A1493967048935%2C%22parentId%22%3A1493967048932%7D;l@@@ApmZtSKqyrSb-jgu1R1cfI-7qY5zJo3Y;isg@@@Amhox-chpQd-LImD8kCRhUGUOFbMGMybN0de_CKZtOPWfQjnyqGcK_6-A69y'\n",
    "cookie_str = cookie_str.replace('@@@','=')\n",
    "headers = {'Cookie':cookie_str}\n",
    "r = requests.post(url,data=data,headers=headers)\n",
    "r.content"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
